Various tools and applications are available for configuring or programming network nodes (e.g., physical network nodes and/or virtual network nodes). One such tool is a programming language, named P4, usable for programming the data plane (e.g., data packet processing) of a network node e.g., a programmable network device. The P4 language is designed to be implementation- or target-independent, protocol independent, and field reconfigurable. For example, P4 source code can be compiled for many different types of targets, has no native support for network protocols, and allow operators to change the way a target (e.g., a central programming unit (CPU), a network processor, a field programmable gate array (FPGA), or an application specific integrated circuits (ASIC)) processes packets after deployment. However, issues can arise when utilizing the P4 language and similar tools. In particular, a network operator needs to be able to effectively test network nodes, including any P4 source code related functionality. While conventional test tools may be designed for hardware appliances with fixed functionality, such tools are not well-suited for testing network nodes with reconfigurable features, e.g., via the P4 programming language, since a P4 programmed device can have nearly arbitrary functionality and handle user-defined protocols.
Accordingly, in light of these difficulties, a need exists for improved methods, systems, and computer readable media for testing a network node or a related application programming interface (API) using source code metadata.